import { UserLayout, BasicLayout } from '@/layouts'
import { bxAnaalyse } from '@/core/icons'

const RouteView = {
  name: 'RouteView',
  render: h => h('router-view')
}

export const asyncRouterMap = [
  {
    path: '/',
    name: 'index',
    component: BasicLayout,
    meta: { title: '首页' },
    redirect: '/dashboard',
    children: [
      // dashboard
      {
        path: '/dashboard',
        name: 'dashboard',
        component: () => import('@/views/dashboard/home/Index'),
        meta: { title: '首页', keepAlive: true, icon: 'icon-nav_home_pre', permissionCode: ['shouye'] },
        // children: [
        //   {
        //     path: '/dashboard/home',
        //     name: 'dashboard-home',
        //
        //     meta: { title: '首页', keepAlive: false, permissionCode: ['shouye'] }
        //   }
        // ]
      },
      {
        path: '/electrical',
        name: 'electrical',
        redirect: '/electrical/home',
        component: RouteView,
        meta: { title: '电气系统管理', keepAlive: true, icon: 'icon-nav_dqxtgl_pre', permissionCode: ['dianqi'] },
        children: [
          {
            path: '/electrical/home',
            name: 'electrical-home',
            component: () => import('@/views/electrical/Home'),
            meta: { title: '首页', keepAlive: false, permissionCode: ['dianqi'] }
          },
          {
            path: '/electrical/real-time',
            name: 'electrical-real-time',
            component: () => import('@/views/electrical/RealTime'),
            meta: { title: '实时数据', keepAlive: false, permissionCode: ['dianqi'] }
          },
          {
            path: '/electrical/history-time',
            name: 'electrical-history-time',
            component: () => import('@/views/electrical/HistoryTime'),
            meta: { title: '历史数据', keepAlive: false, permissionCode: ['dianqi'] }
          },
          {
            path: '/electrical/predict',
            name: 'electrical-predict',
            redirect: '/electrical/predict/Result',
            component: RouteView,
            meta: { title: '预测分析', keepAlive: true, icon: bxAnaalyse, permissionCode: ['dianqi'] },
            children: [
              {
                path: '/electrical/predict/Result',
                name: 'electrical-predict-result',
                component: () => import('@/views/electrical/predict/Result'),
                meta: { title: '预测结果', keepAlive: false, permissionCode: ['dianqi'] }
              },
              {
                path: '/electrical/predict/algorithm',
                name: 'electrical-predict-algorithm',
                component: () => import('@/views/electrical/predict/algorithm'),
                meta: { title: '算法调用', keepAlive: false, permissionCode: ['dianqi', 'dianqitijiao'] }
              },
              {
                path: '/electrical/predict/autoAlgorithm',
                name: 'electrical-predict-autoAlgorithm',
                component: () => import('@/views/electrical/predict/autoAlgorithm'),
                meta: { title: '自动算法调用', keepAlive: false, permissionCode: ['dianqi', 'dianqitijiao'] }
              }
            ]
          }
        ]
      },
      {
        path: '/HVAC',
        name: 'HVAC',
        redirect: '/HVAC/home',
        component: RouteView,
        meta: { title: '暖通系统管理', keepAlive: true, icon: 'icon-nav_ntxtgl_pre', permissionCode: ['nuantong'] },
        children: [
          {
            path: '/HVAC/home',
            name: 'HVAC-home',
            component: () => import('@/views/HVAC/Home'),
            meta: { title: '首页', keepAlive: false, permissionCode: ['nuantong'] }
          },
          {
            path: '/HVAC/real-time',
            name: 'HVAC-real-time',
            component: () => import('@/views/HVAC/RealTime'),
            meta: { title: '实时数据', keepAlive: false, permissionCode: ['nuantong'] }
          },
          {
            path: '/HVAC/history-time',
            name: 'HVAC-history-time',
            component: () => import('@/views/HVAC/HistoryTime'),
            meta: { title: '历史数据', keepAlive: false, permissionCode: ['nuantong'] }
          },
          {
            path: '/HVAC/predict',
            name: 'HVAC-predict',
            redirect: '/HVAC/predict/Result',
            component: RouteView,
            meta: { title: '预测分析', keepAlive: true, icon: bxAnaalyse, permissionCode: ['nuantong'] },
            children: [
              {
                path: '/HVAC/predict/Result',
                name: 'HVAC-predict-result',
                component: () => import('@/views/HVAC/predict/Result'),
                meta: { title: '预测结果', keepAlive: false, permissionCode: ['nuantong'] }
              },
              {
                path: '/HVAC/predict/algorithm',
                name: 'HVAC-predict-algorithm',
                component: () => import('@/views/HVAC/predict/algorithm'),
                meta: { title: '算法调用', keepAlive: false, permissionCode: ['nuantong', 'nuantongtijiao'] }
              },
              {
                path: '/HVAC/predict/autoAlgorithm',
                name: 'HVAC-predict-autoAlgorithm',
                component: () => import('@/views/HVAC/predict/autoAlgorithm'),
                meta: { title: '自动算法调用', keepAlive: false, permissionCode: ['nuantong', 'nuantongtijiao'] }
              }
            ]
          }
        ]
      },
      {
        path: '/hydrogen',
        name: 'hydrogen',
        redirect: '/hydrogen/home',
        component: RouteView,
        permissionCode: 'qingneng',
        meta: { title: '氢能系统管理', keepAlive: true, icon: 'icon-nav_qyxtgl_pre', permissionCode: ['qingneng'] },
        children: [
          {
            path: '/hydrogen/home',
            name: 'hydrogen-home',
            component: () => import('@/views/hydrogen/Home'),
            meta: { title: '首页', keepAlive: false, permissionCode: ['qingneng'] }
          },
          {
            path: '/hydrogen/real-time',
            name: 'hydrogen-real-time',
            component: () => import('@/views/hydrogen/RealTime'),
            meta: { title: '实时数据', keepAlive: false, permissionCode: ['qingneng'] }
          },
          {
            path: '/hydrogen/history-time',
            name: 'hydrogen-history-time',
            component: () => import('@/views/hydrogen/HistoryTime'),
            meta: { title: '历史数据', keepAlive: false, permissionCode: ['qingneng'] }
          }
        ]
      },
      // {
      //   path: '/info',
      //   name: 'info',
      //   redirect: '/info/home',
      //   component: RouteView,
      //   permissionCode: 'xinxi',
      //   meta: { title: '信息系统管理', keepAlive: true, icon: 'info-circle', permissionCode: ['xinxi'] },
      //   children: [
      //     {
      //       path: '/info/home',
      //       name: 'info-home',
      //       component: () => import('@/views/info/Home'),
      //       meta: { title: '首页', keepAlive: false, permissionCode: ['xinxi'] }
      //     },
      //     {
      //       path: '/info/real-time',
      //       name: 'info-real-time',
      //       component: () => import('@/views/info/RealTime'),
      //       meta: { title: '实时数据', keepAlive: false, permissionCode: ['xinxi'] }
      //     },
      //     {
      //       path: '/info/history-time',
      //       name: 'info-history-time',
      //       component: () => import('@/views/info/HistoryTime'),
      //       meta: { title: '历史数据', keepAlive: false, permissionCode: ['xinxi'] }
      //     },
      //     {
      //       path: '/info/predict',
      //       name: 'info-predict',
      //       redirect: '/info/predict/Result',
      //       component: RouteView,
      //       meta: { title: '预测分析', keepAlive: true, icon: bxAnaalyse, permissionCode: ['xinxi'] },
      //       children: [
      //         {
      //           path: '/info/predict/Result',
      //           name: 'info-predict-result',
      //           component: () => import('@/views/info/predict/Result'),
      //           meta: { title: '通信链路可靠性分析', keepAlive: false, permissionCode: ['xinxi'] }
      //         },
      //         {
      //           path: '/info/predict/algorithm',
      //           name: 'info-predict-algorithm',
      //           component: () => import('@/views/info/predict/algorithm'),
      //           meta: { title: '算法调用', keepAlive: false, permissionCode: ['xinxi', 'xinxitijiao'] }
      //         },
      //         {
      //           path: '/info/predict/autoAlgorithm',
      //           name: 'info-predict-autoAlgorithm',
      //           component: () => import('@/views/info/predict/autoAlgorithm'),
      //           meta: { title: '自动算法调用', keepAlive: false, permissionCode: ['xinxi', 'xinxitijiao'] }
      //         }
      //       ]
      //     }
      //   ]
      // },
      {
        path: '/person',
        name: 'person',
        redirect: '/person/home',
        component: RouteView,
        meta: { title: '需求侧管理', keepAlive: true, icon: 'icon-nav_xqcgl', permissionCode: ['xvqiuce'] },
        children: [
          {
            path: '/person/home',
            name: 'person-home',
            component: () => import('@/views/person/Home'),
            meta: { title: '首页', keepAlive: false, permissionCode: ['xvqiuce'] }
          },
          {
            path: '/person/person',
            name: 'person-person',
            component: () => import('@/views/person/Person'),
            meta: { title: '人员视频监控', keepAlive: false, permissionCode: ['xvqiuce'] }
          },
          {
            path: '/person/realTime',
            name: 'person-real-time',
            component: () => import('@/views/person/RealTime'),
            meta: { title: '实时数据', keepAlive: false, permissionCode: ['xvqiuce'] }
          },
          {
            path: '/person/history',
            name: 'person-history',
            component: () => import('@/views/person/HistoryTime'),
            meta: { title: '历史数据', keepAlive: false, permissionCode: ['xvqiuce'] }
          },
          {
            path: '/person/env',
            name: 'person-env',
            component: () => import('@/views/person/Env'),
            meta: { title: '环境质量', keepAlive: false, permissionCode: ['xvqiuce'] }
          },
          {
            path: '/person/data',
            name: 'person-data',
            component: () => import('@/views/person/Data'),
            meta: { title: '热舒适度数据', keepAlive: false, permissionCode: ['xvqiuce'] }
          },
          {
            path: '/person/person-predict/Result',
            name: 'person-person-predict-result',
            component: () => import('@/views/person/person-predict/Result'),
            meta: { title: '人员分布人流预测', keepAlive: false, permissionCode: ['xvqiuce'] }
          },
          {
            path: '/person/predict',
            name: 'person-predict',
            redirect: '/person/predict/Result',
            component: RouteView,
            meta: { title: '预测分析', keepAlive: true, icon: bxAnaalyse, permissionCode: ['xvqiuce'] },
            children: [
              // {
              //   path: '/person/predict/Result',
              //   name: 'person-predict-result',
              //   component: () => import('@/views/person/predict/Result'),
              //   meta: { title: '预测结果', keepAlive: false }
              // },
              {
                path: '/person/predict/algorithm',
                name: 'person-predict-algorithm',
                component: () => import('@/views/person/predict/algorithm'),
                meta: { title: '算法调用', keepAlive: false, permissionCode: ['xvqiuce', 'xvqiucetijiao'] }
              },
              {
                path: '/person/predict/autoAlgorithm',
                name: 'person-predict-autoAlgorithm',
                component: () => import('@/views/person/predict/autoAlgorithm'),
                meta: { title: '自动算法调用', keepAlive: false, permissionCode: ['xvqiuce', 'xvqiucetijiao'] }
              }
            ]
          }
          // ,
          // {
          //   path: '/person/person-predict',
          //   name: 'person-person-predict',
          //   redirect: '/person/person-predict/Result',
          //   component: RouteView,
          //   meta: { title: '人员人流预测', keepAlive: true, icon: bxAnaalyse },
          //   children: [
          //   ]
          // }
        ]
      },
      {
        path: '/analyze',
        name: 'analyze',
        redirect: '/analyze/hot',
        component: RouteView,
        meta: { title: '分析评估', keepAlive: true, icon: 'icon-nav_xxxtgl', permissionCode: ['fenxipinggu'] },
        children: [
          {
            path: '/analyze/hot',
            name: 'analyze-hot',
            component: () => import('@/views/analyze/Hot.vue'),
            meta: { title: '热需求弹性分析', keepAlive: false, permissionCode: ['fenxipinggu'] }
          },
          {
            path: '/analyze/economy',
            name: 'analyze-economy',
            component: () => import('@/views/analyze/Economy.vue'),
            meta: { title: '经济性评估', keepAlive: false, permissionCode: ['fenxipinggu'] }
          },
          {
            path: '/analyze/comprehensive',
            name: 'analyze-comprehensive',
            component: () => import('@/views/analyze/Comprehensive.vue'),
            meta: { title: '综合能效评估', keepAlive: false, permissionCode: ['fenxipinggu'] }
          },
          // {
          //   path: '/analyze/product',
          //   name: 'analyze-product',
          //   component: () => import('@/views/analyze/Product.vue'),
          //   meta: { title: '生产用能分析', keepAlive: false }
          // },
          {
            path: '/analyze/reliability',
            name: 'analyze-reliability',
            component: () => import('@/views/analyze/Reliability.vue'),
            meta: { title: '可靠性评估', keepAlive: false, permissionCode: ['fenxipinggu'] }
          },
          {
            path: '/analyze/carbon',
            name: 'analyze-carbon',
            component: () => import('@/views/analyze/Carbon.vue'),
            meta: { title: '碳排放测算', keepAlive: false, permissionCode: ['fenxipinggu'] }
          },
          {
            path: '/analyze/carbon-trade',
            name: 'analyze-carbon-trade',
            component: () => import('@/views/analyze/CarbonTrade.vue'),
            meta: { title: '碳交易', keepAlive: false, permissionCode: ['fenxipinggu'] }
          },
          {
            path: '/analyze/analyze-predict',
            name: 'analyze-analyze-predict',
            redirect: '/analyze/analyze-predict/algorithm',
            component: RouteView,
            meta: {
              title: '算法调用',
              keepAlive: true,
              icon: bxAnaalyse,
              permissionCode: ['fenxipinggu', 'fenxipinggutijiao']
            },
            children: [
              {
                path: '/analyze/algorithm',
                name: 'analyze-algorithm',
                component: () => import('@/views/analyze/predict/algorithm/index.vue'),
                meta: { title: '算法调用', keepAlive: false, permissionCode: ['fenxipinggu', 'fenxipinggutijiao'] }
              },
              {
                path: '/analyze/autoAlgorithm',
                name: 'analyze-autoAlgorithm',
                component: () => import('@/views/analyze/predict/autoAlgorithm/index.vue'),
                meta: { title: '自动算法调用', keepAlive: false, permissionCode: ['fenxipinggu', 'fenxipinggutijiao'] }
              }
            ]
          }
        ]
      },
      {
        path: '/run',
        name: 'run',
        permissionCode: 'yunxingyouhua',
        redirect: '/run/run-predict',
        component: RouteView,
        meta: { title: '运行优化与控制', keepAlive: true, icon: 'icon-nav_yxyhykz', permissionCode: ['yunxingyouhua'] },
        children: [
          {
            path: '/run/run-predict',
            name: 'run-run-predict',
            redirect: '/run/run-predict/result',
            component: RouteView,
            meta: { title: '优化策略计算', keepAlive: true, icon: bxAnaalyse, permissionCode: ['yunxingyouhua'] },
            children: [
              {
                path: '/run/run-predict/result',
                name: 'run-run-predict-result',
                component: () => import('@/views/run/predict/Result'),
                meta: { title: '优化策略结果', keepAlive: false, permissionCode: ['yunxingyouhua'] }
              },
              {
                path: '/run/run-predict/algorithm',
                name: 'run-run-predict-algorithm',
                component: () => import('@/views/run/predict/algorithm'),
                meta: { title: '算法调用', keepAlive: false, permissionCode: ['yunxingyouhua', 'yunxingyouhuatijiao'] }
              },
              {
                path: '/run/run-predict/autoAlgorithm',
                name: 'run-run-predict-autoAlgorithm',
                component: () => import('@/views/run/predict/autoAlgorithm'),
                meta: {
                  title: '自动算法调用',
                  keepAlive: false,
                  permissionCode: ['yunxingyouhua', 'yunxingyouhuatijiao']
                }
              }
            ]
          },
          {
            path: '/run/strategy-predict',
            name: 'run-strategy-predict',
            redirect: '/run/strategy/algorithm',
            component: RouteView,
            meta: {
              title: '优化策略执行',
              keepAlive: true,
              icon: bxAnaalyse,
              permissionCode: ['yunxingyouhua', 'yunxingyouhuatijiao']
            },
            children: [
              {
                path: '/run/strategy/algorithm',
                name: 'run-strategy-algorithm',
                component: () => import('@/views/run/strategy/algorithm'),
                meta: {
                  title: '优化策略手动执行',
                  keepAlive: false,
                  permissionCode: ['yunxingyouhua', 'yunxingyouhuatijiao']
                }
              },
              {
                path: '/run/strategy/autoAlgorithm',
                name: 'run-strategy-autoAlgorithm',
                component: () => import('@/views/run/strategy/autoAlgorithm'),
                meta: {
                  title: '优化策略自动执行',
                  keepAlive: false,
                  permissionCode: ['yunxingyouhua', 'yunxingyouhuatijiao']
                }
              }
            ]
          }
        ]
      },
      {
        path: '/security',
        name: 'security',
        permissionCode: 'zongheanquan',
        redirect: '/security/physics',
        component: RouteView,
        meta: { title: '综合安全管理', keepAlive: true, icon: 'icon-nav_zhaqgl', permissionCode: ['zongheanquan'] },
        children: [
          {
            path: '/security/physics',
            name: 'security-physics',
            redirect: '/security/physics/home',
            component: RouteView,
            meta: { title: '物理侧安全管理', keepAlive: true, permissionCode: ['zongheanquan'] },
            children: [
              {
                path: '/security/physics/home',
                name: 'security-physics-home',
                component: () => import('@/views/security/physics/Home'),
                meta: { title: '物理设备异常检测', keepAlive: false, permissionCode: ['zongheanquan'] }
              }
            ]
          },
          {
            path: '/security/info-security',
            name: 'security-info-security',
            redirect: '/security/info-security/statistics',
            component: RouteView,
            meta: { title: '信息侧安全管理', keepAlive: true, permissionCode: ['zongheanquan'] },
            children: [

              {
                path: '/security/info-security/statistics',
                name: 'security-info-security-statistics',
                component: () => import('@/views/security/warning/Statistics'),
                meta: { title: '告警特征统计', keepAlive: true, permissionCode: ['zongheanquan'] }
              },
              {
                path: '/security/info-security/time',
                name: 'security-info-security-time',
                component: () => import('@/views/security/warning/Time'),
                meta: { title: '时间态势分析', keepAlive: true, permissionCode: ['zongheanquan'] }
              },
              {
                path: '/security/info-security/analyze',
                name: 'security-info-security-analyze',
                component: () => import('@/views/security/warning/Analyze'),
                meta: { title: '告警周期性分析', keepAlive: true, permissionCode: ['zongheanquan'] }
              },
              {
                path: '/security/info-security/typical',
                name: 'security-info-security-typical',
                component: () => import('@/views/security/warning/Typical'),
                meta: { title: '告警攻击链', keepAlive: false, permissionCode: ['zongheanquan'] }
              }
            ]
          },
          {
            path: '/security/predict',
            name: 'security-predict',
            redirect: '/security/predict/algorithm',
            component: RouteView,
            meta: {
              title: '算法调用',
              keepAlive: true,
              icon: bxAnaalyse,
              permissionCode: ['zongheanquan', 'zongheanquantijiao']
            },
            children: [
              {
                path: '/security/predict/algorithm',
                name: 'security-algorithm',
                component: () => import('@/views/security/predict/algorithm'),
                meta: {
                  title: '算法调用', keepAlive: false,
                  permissionCode: ['zongheanquan', 'zongheanquantijiao']
                }
              },
              {
                path: '/security/predict/autoAlgorithm',
                name: 'security-autoAlgorithm',
                component: () => import('@/views/security/predict/autoAlgorithm'),
                meta: {
                  title: '自动算法调用', keepAlive: false,
                  permissionCode: ['zongheanquan', 'zongheanquantijiao']
                }
              }
            ]
          }
        ]
      },
      {
        path: '/money',
        name: 'money',
        permissionCode: 'zichanguanli',
        redirect: '/money/electric',
        component: RouteView,
        meta: {
          title: '资产管理', keepAlive: true, icon: 'icon-nav_zcgl',
          permissionCode: ['zichanguanli']
        },
        children: [
          {
            path: '/money/electric',
            name: 'money-electric',
            component: () => import('@/views/money/Electric'),
            meta: {
              title: '电气系统设备', keepAlive: false,
              permissionCode: ['zichanguanli']
            }
          },
          {
            path: '/money/hvac',
            name: 'money-hvac',
            component: () => import('@/views/money/HVAC'),
            meta: {
              title: '暖通系统设备', keepAlive: false,
              permissionCode: ['zichanguanli']
            }
          },
          {
            path: '/money/hydrogen',
            name: 'money-hydrogen',
            component: () => import('@/views/money/Hydrogen'),
            meta: {
              title: '氢能系统设备', keepAlive: false,
              permissionCode: ['zichanguanli']
            }
          },
          // {
          //   path: '/money/info',
          //   name: 'money-info',
          //   component: () => import('@/views/money/Info'),
          //   meta: {
          //     title: '信息系统设备', keepAlive: false,
          //     permissionCode: ['zichanguanli']
          //   }
          // }
        ]
      },
      {
        path: '/maintenance',
        name: 'maintenance',
        redirect: '/maintenance/work-order',
        component: RouteView,
        meta: {
          title: '运维管理',
          keepAlive: true,
          icon: 'icon-nav_ywgl',
          permissionCode: ['yunweiguanli']
        },
        children: [
          {
            path: '/maintenance',
            name: 'maintenance',
            redirect: '/maintenance/work-order-count',
            meta: {
              title: '工单运维',
              keepAlive: true,
              icon: 'tool',
              permissionCode: ['yunweiguanli']
            },
            component: RouteView,
            children: [
              {
                path: '/maintenance/work-order-count',
                name: 'maintenance-work-order-count',
                component: () => import('@/views/maintenance/WorkOrderCount'),
                meta: {
                  title: '工单统计',
                  keepAlive: false,
                  permissionCode: ['yunweiguanli']
                }
              },
              {
                path: '/maintenance/work-order',
                name: 'maintenance-work-order',
                component: () => import('@/views/maintenance/WorkOrder'),
                meta: {
                  title: '工单管理',
                  keepAlive: false,
                  permissionCode: ['yunweiguanli']
                }
              }
            ]
          },
          {
            path: '/maintenance/operation',
            name: 'maintenance-operation',
            component: RouteView,
            redirect: '/maintenance/operation/template',
            meta: {
              title: '操作票管理',
              keepAlive: false,
              permissionCode: ['yunweiguanli']
            },
            children: [
              {
                path: '/maintenance/operation/template',
                name: 'maintenance-operation-template',
                component: () => import('@/views/maintenance/operation/Template'),
                meta: {
                  title: '操作票模板',
                  keepAlive: false,
                  permissionCode: ['yunweiguanli']
                }
              },
              {
                path: '/maintenance/operation/log',
                name: 'maintenance-operation-log',
                component: () => import('@/views/maintenance/operation/Log'),
                meta: {
                  title: '操作票记录',
                  keepAlive: false,
                  permissionCode: ['yunweiguanli']
                }
              }
            ]
          },
          {
            path: '/maintenance/device',
            name: 'maintenance-device',
            component: () => import('@/views/maintenance/Device'),
            meta: {
              title: '设备维护管理',
              keepAlive: false,
              permissionCode: ['yunweiguanli']
            }
          },
          {
            path: '/maintenance/inspection',
            name: 'maintenance-inspection',
            component: () => import('@/views/maintenance/Inspection'),
            meta: {
              title: '巡检管理',
              keepAlive: false,
              permissionCode: ['yunweiguanli']
            }
          },
          {
            path: '/maintenance/bug',
            name: 'maintenance-bug',
            component: () => import('@/views/maintenance/Bug'),
            meta: {
              title: '缺陷管理',
              keepAlive: false,
              permissionCode: ['yunweiguanli']
            }
          },
          {
            path: '/maintenance/alarm',
            name: 'maintenance-alarm',
            component: () => import('@/views/maintenance/Alarm'),
            meta: {
              title: '告警管理',
              keepAlive: false,
              permissionCode: ['yunweiguanli']
            }
          },
          {
            path: '/maintenance/person',
            name: 'maintenance-person',
            component: () => import('@/views/maintenance/Person'),
            meta: {
              title: '运维人员',
              keepAlive: false,
              permissionCode: ['yunweiguanli']
            }
          },
          {
            path: '/maintenance/emergency',
            name: 'maintenance-emergency',
            component: () => import('@/views/maintenance/Emergency'),
            meta: {
              title: '应急管理',
              keepAlive: false,
              permissionCode: ['yunweiguanli']
            }
          },
          {
            path: '/maintenance/export-data',
            name: 'maintenance-export-data',
            component: RouteView,
            meta: {
              title: '数据导出',
              keepAlive: false,
              permissionCode: ['yunweiguanli']
            },
            children: [
              {
                path: '/maintenance/export-data/data',
                name: 'maintenance-export-data-data',
                component: () => import('@/views/maintenance/export-data/Data'),
                meta: {
                  title: '导出数据',
                  keepAlive: false,
                  permissionCode: ['yunweiguanli']
                }
              },
              {
                path: '/maintenance/export-data/report',
                name: 'maintenance-export-data-report',
                component: () => import('@/views/maintenance/export-data/Report'),
                meta: {
                  title: '导出报表',
                  keepAlive: false,
                  permissionCode: ['yunweiguanli']
                }
              }
            ]
          }
        ]
      },
      {
        path: '/cfg',
        name: 'cfg',
        redirect: '/cfg/data',
        component: RouteView,
        permissionCode: 'peizhiguanli',
        meta: {
          title: '配置管理',
          keepAlive: true,
          icon: 'icon-nav_pzgl',
          permissionCode: ['peizhiguanli']
        },
        children: [
          {
            path: '/cfg/data',
            name: 'cfg-data',
            component: () => import('@/views/cfg/Data'),
            meta: {
              title: '实时数据配置',
              keepAlive: false,
              permissionCode: ['peizhiguanli']
            }
          },
          {
            path: '/cfg/algorithm',
            name: 'cfg-algorithm',
            component: () => import('@/views/cfg/Algorithm'),
            meta: {
              title: '算法配置',
              keepAlive: false,
              permissionCode: ['peizhiguanli']
            }
          },
          {
            path: '/cfg/algorithm-task',
            name: 'cfg-algorithm-task',
            component: () => import('@/views/cfg/AlgorithmTask'),
            meta: {
              title: '算法任务配置',
              keepAlive: false,
              permissionCode: ['peizhiguanli']
            }
          }
        ]
      },
      {
        path: '/sys',
        name: 'sys',
        redirect: '/sys/user',
        component: RouteView,
        meta: {
          title: '系统管理',
          keepAlive: true,
          icon: 'icon-nav_xtgl',
        },
        children: [
          {
            path: '/sys/user',
            name: 'sys-user',
            component: () => import('@/views/sys/user/Index'),
            meta: {
              title: '用户管理',
              keepAlive: false,
            }
          },
          {
            path: '/sys/personal',
            name: 'sys-personal',
            component: () => import('@/views/sys/personal/Index'),
            meta: {
              title: '个人中心',
              keepAlive: false,
              hidden: true
            }
          },
          {
            path: '/sys/role',
            name: 'sys-role',
            component: () => import('@/views/sys/role/Index'),
            meta: {
              title: '角色管理',
              keepAlive: false,
            }
          },
          {
            path: '/sys/log',
            name: 'sys-log',
            component: () => import('@/views/sys/log/Index'),
            meta: {
              title: '日志管理',
              keepAlive: false,
            }
          }
        ]
      }
    ]
  },
  {
    path: '/403',
    redirect: '/403',
    hidden: true
  },
  {
    path: '*',
    redirect: '/404',
    hidden: true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/user',
    component: UserLayout,
    redirect: '/user/login',
    hidden: true,
    children: [
      {
        path: 'login',
        name: 'login',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
      },
      {
        path: 'register',
        name: 'register',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
      },
      {
        path: 'register-result',
        name: 'registerResult',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
      },
      {
        path: 'recover',
        name: 'recover',
        component: undefined
      }
    ]
  },
  {
    path: '/403',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/403')
  },
  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  }
]
